original_string: public function activationEmail()
      {
          $this->loadModel('User.Users');
          $sent = false;
  
          if (!empty($this->request->data['username'])) {
              $user = $this->Users
                  ->find()
                  ->where([
                      'OR' => [
                          'username' => $this->request->data['username'],
                          'email' => $this->request->data['username'],
                      ],
                      'status' => 0
                  ])
                  ->limit(1)
                  ->first();
  
              if ($user) {
                  NotificationManager::welcome($user)->send();
                  $this->Flash->success(__d('user', 'Instructions have been sent to your e-mail address.'), ['key' => 'activation_email']);
                  $sent = true;
              } else {
                  $this->Flash->danger(__d('user', 'No account was found matching the given username/email.'), ['key' => 'activation_email']);
              }
          }
  
          $this->title(__d('user', 'Activation Request'));
          $this->set(compact('sent'));
      }
code: public function activationEmail()
      {
          $this->loadModel('User.Users');
          $sent = false;
  
          if (!empty($this->request->data['username'])) {
              $user = $this->Users
                  ->find()
                  ->where([
                      'OR' => [
                          'username' => $this->request->data['username'],
                          'email' => $this->request->data['username'],
                      ],
                      'status' => 0
                  ])
                  ->limit(1)
                  ->first();
  
              if ($user) {
                  NotificationManager::welcome($user)->send();
                  $this->Flash->success(__d('user', 'Instructions have been sent to your e-mail address.'), ['key' => 'activation_email']);
                  $sent = true;
              } else {
                  $this->Flash->danger(__d('user', 'No account was found matching the given username/email.'), ['key' => 'activation_email']);
              }
          }
  
          $this->title(__d('user', 'Activation Request'));
          $this->set(compact('sent'));
      }
code_tokens: public function activationEmail ( ) { $ this -> loadModel ( 'User.Users' ) ; $ sent = false ; if ( ! empty ( $ this -> request -> data [ 'username' ] ) ) { $ user = $ this -> Users -> find ( ) -> where ( [ 'OR' => [ 'username' => $ this -> request -> data [ 'username' ] , 'email' => $ this -> request -> data [ 'username' ] , ] , 'status' => 0 ] ) -> limit ( 1 ) -> first ( ) ; if ( $ user ) { NotificationManager :: welcome ( $ user ) -> send ( ) ; $ this -> Flash -> success ( __d ( 'user' , 'Instructions have been sent to your e-mail address.' ) , [ 'key' => 'activation_email' ] ) ; $ sent = true ; } else { $ this -> Flash -> danger ( __d ( 'user' , 'No account was found matching the given username/email.' ) , [ 'key' => 'activation_email' ] ) ; } } $ this -> title ( __d ( 'user' , 'Activation Request' ) ) ; $ this -> set ( compact ( 'sent' ) ) ; }
docstring: Users can request to re-send activation instructions to their email address.
  
  @return void
docstring_tokens: Users can request to re - send activation instructions to their email address .