Skip to content

Commit 5d5690f

Browse files
committed
minor clean-ups
- use single quotes for strings that do not require interpolation - whitespace clean-up - lines <80 characters
1 parent f1fc232 commit 5d5690f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

addCCIDUser.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
class AddCCIDUser extends Maintenance {
2424

2525
public function __construct() {
26-
parent::__construct();
27-
$this->mDescription = "Create a new CCID user account.";
26+
parent::__construct();
27+
$this->mDescription = 'Create a new CCID user account.';
2828

29-
$this->addArg( "global", "CCID global identifier of new user" );
30-
$this->addArg( "email", "CCID email of new user" );
29+
$this->addArg( 'global', 'CCID global identifier of new user' );
30+
$this->addArg( 'email', 'CCID email of new user' );
3131
}
3232

3333
public function execute() {
@@ -44,7 +44,7 @@ public function execute() {
4444
$u = User::newFromName( $ccid_name );
4545
// Create a new account if the user does not exists
4646
if ($u->getID() != 0) {
47-
$this->error("User already exists", true);
47+
$this->error('User already exists', true);
4848
exit(1);
4949
} else {
5050
//$nickname = $attr['nickname'];
@@ -53,7 +53,9 @@ public function execute() {
5353
$u->setRealName($nickname);
5454
$u->setEmail($casuid);
5555
$u->confirmEmail();
56-
$u->setPassword( md5($casuid.$CASAuth["PwdSecret"]) ); //PwdSecret is used to salt the casuid, which is then used to create an md5 hash which becomes the password
56+
//PwdSecret is used to salt the casuid, which is then used to
57+
// create an md5 hash which becomes the password
58+
$u->setPassword( md5($casuid.$CASAuth['PwdSecret']) );
5759
$u->setToken();
5860
$u->saveSettings();
5961
// Update user count
@@ -63,5 +65,5 @@ public function execute() {
6365
}
6466
}
6567

66-
$maintClass = "AddCCIDUser";
68+
$maintClass = 'AddCCIDUser';
6769
require_once RUN_MAINTENANCE_IF_MAIN;

0 commit comments

Comments
 (0)