Example #1
0
 public function command()
 {
     $username = trim($this->arguments[0]);
     $pass = trim($this->arguments[1]);
     $result = \MangaApi::registerUser($username, $pass);
     if (!$result['result']) {
         $this->notice($result['message']);
     } else {
         $this->notice('Username and password is now registered');
         $this->notice('You may now login at https://manga.madokami.com/');
     }
 }
Example #2
0
 public function command()
 {
     $username = trim($this->arguments[0]);
     $oldPassword = trim($this->arguments[1]);
     $newPassword = trim($this->arguments[2]);
     $result = \MangaApi::changePassword($username, $oldPassword, $newPassword);
     if (!$result['result']) {
         $this->notice($result['message']);
     } else {
         $this->notice('Password has been updated.');
     }
 }