Exemplo n.º 1
0
 public function set_new_key()
 {
     //now we're going to set the random key
     $this->random_key = random_key(20);
     //before we can set that random key to the object
     //we NEED to make sure it doesn't exist
     while (Reset_Password::is_random_key_being_used($this->random_key)) {
         //while this key does it exist, keep looping through and generating new
         //random keys until it already exists
         $this->random_key = random_key(20);
     }
 }