[freeside-commits] branch FREESIDE_4_BRANCH updated. 0498fc08c922aed11dc6c98ee674f502a29f7183

Ivan Kohler ivan at freeside.biz
Mon Jan 22 16:52:43 PST 2018


The branch, FREESIDE_4_BRANCH has been updated
       via  0498fc08c922aed11dc6c98ee674f502a29f7183 (commit)
      from  cb1d012f6abd6a122da3257ef38af9ec85c9c6c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0498fc08c922aed11dc6c98ee674f502a29f7183
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jan 22 16:52:42 2018 -0800

    set employee password CLI

diff --git a/FS/bin/freeside-passwd b/FS/bin/freeside-passwd
new file mode 100755
index 000000000..dbd566e84
--- /dev/null
+++ b/FS/bin/freeside-passwd
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+my $user = shift or die &usage;
+my $password = shift or die &usage;
+
+use FS::UID qw(adminsuidsetup);
+use FS::Record qw( qsearchs );
+use FS::access_user;
+
+adminsuidsetup $user;
+
+my $access_user = qsearchs('access_user', {'username'=>$user})
+  or die "unknown username $user\n";
+my $error = $access_user->change_password($password);
+die $error if $error;
+
+1;

-----------------------------------------------------------------------

Summary of changes:
 FS/bin/freeside-passwd | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100755 FS/bin/freeside-passwd




More information about the freeside-commits mailing list