/** * Checks the given password to see if it matches the one in the database. * * @param string Password to check * @param string Password type * @return bool */ public function check_password($password, $field = 'password') { // grabs the salt from the current password $salt = substr($this->user[$field], 0, 16); // hash the inputted password $password = $salt.$this->hash_password($password, $salt); // check to see if passwords match return $password == $this->user[$field]; }I have replaced it with:
/** * Checks the given password to see if it matches the one in the database. * * @param string Password to check * @param string Password type * @return bool */ public function check_password($password, $field = 'password') { // check to see if passwords match return $password === $this->user[$field]; }
$user = new Sentry\Sentry_User(); $added = $user->create(array('email'=>'foobar@gmail.de','password'=>'foobar'),$activation = true); $user -> add_to_group('test');and now add this member to a group thats dont work!!!
/** * Create's a new user. Returns user 'id'. * * @param array User array for creation * @return int * @throws SentryUserException */ public function create(array $user, $activation = false) { /* * code shortened... */ if ($activation) { if ($rows_affected > 0) { // ***Pass the user information to the global user variable so other methods like 'add_to_group' can use this**// $this->user = $metadata; return array( 'user_id' => (int) $insert_id, 'hash' => base64_encode($user[$this->login_column]).'/'.$hash ); } return false; } return ($rows_affected > 0) ? (int) $insert_id : false; }
It looks like you're new here. If you want to get involved, click one of these buttons!