@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $user = $users[0]; |
51 | 51 | |
52 | 52 | |
53 | - if($user == null) |
|
53 | + if ($user == null) |
|
54 | 54 | { |
55 | 55 | $io->error(sprintf('No user with the given username %s found in the database!', $user_name)); |
56 | 56 | return; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | sprintf('You are going to change the password of %s with ID %d. Proceed?', |
63 | 63 | $user->getFullName(true), $user->getID())); |
64 | 64 | |
65 | - if(!$proceed) |
|
65 | + if (!$proceed) |
|
66 | 66 | { |
67 | 67 | return; |
68 | 68 | } |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | $success = false; |
71 | 71 | $new_password = ""; |
72 | 72 | |
73 | - while(!$success) { |
|
73 | + while (!$success) { |
|
74 | 74 | $pw1 = $io->askHidden("Please enter new password:"); |
75 | 75 | $pw2 = $io->askHidden('Please confirm:'); |
76 | - if($pw1 !== $pw2) { |
|
76 | + if ($pw1 !== $pw2) { |
|
77 | 77 | $io->error('The entered password did not match! Please try again.'); |
78 | 78 | } else { |
79 | 79 | //Exit loop |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | class User extends NamedDBElement implements UserInterface, HasPermissionsInterface |
49 | 49 | { |
50 | 50 | /** The User id of the anonymous user */ |
51 | - const ID_ANONYMOUS = 1; |
|
51 | + const ID_ANONYMOUS = 1; |
|
52 | 52 | |
53 | 53 | /** |
54 | 54 | * @ORM\Id() |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | public function getIDString(): string |
223 | 223 | { |
224 | - return 'U' . sprintf('%06d', $this->getID()); |
|
224 | + return 'U'.sprintf('%06d', $this->getID()); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | |
@@ -242,9 +242,9 @@ discard block |
||
242 | 242 | */ |
243 | 243 | public function getFullName(bool $including_username = false) |
244 | 244 | { |
245 | - $str = $this->getFirstName() . ' ' . $this->getLastName(); |
|
245 | + $str = $this->getFirstName().' '.$this->getLastName(); |
|
246 | 246 | if ($including_username) { |
247 | - $str .= ' (' . $this->getName() . ')'; |
|
247 | + $str .= ' ('.$this->getName().')'; |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | return $str; |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | public function setName(string $new_name) : NamedDBElement |
255 | 255 | { |
256 | 256 | // Anonymous user is not allowed to change its username |
257 | - if(!$this->isAnonymousUser()) { |
|
257 | + if (!$this->isAnonymousUser()) { |
|
258 | 258 | $this->name = $new_name; |
259 | 259 | } |
260 | 260 |