You are here

public function GoogleAuthenticator::setUserKey in Google Authenticator login 7

Same name and namespace in other branches
  1. 6 ga4php.php \GoogleAuthenticator::setUserKey()

Sets a users key.

File

./ga4php.php, line 158
Abstract GoogleAuthenticator class.

Class

GoogleAuthenticator
@file Abstract GoogleAuthenticator class.

Code

public function setUserKey($username, $key) {
  $token = $this
    ->internalGetData($username);
  $token["tokenkey"] = $key;
  $this
    ->internalPutData($username, $token);

  // @todo error checking.
  return TRUE;
}