ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_Container_SMBPasswd Class Reference
+ Inheritance diagram for Auth_Container_SMBPasswd:
+ Collaboration diagram for Auth_Container_SMBPasswd:

Public Member Functions

 Auth_Container_SMBPasswd ($filename)
 Constructor of the container class.
 fetchData ($username, $password)
 Get user information from pwfile.
 listUsers ()
 List all users that are available from the storage container.
 addUser ($username, $password, $additional= '')
 Add a new user to the storage container.
 removeUser ($username)
 Remove user from the storage container.
 changePassword ($username, $password)
 Change password for user in the storage container.
- Public Member Functions inherited from Auth_Container
 Auth_Container ()
 Constructor.
 fetchData ($username, $password, $isChallengeResponse=false)
 Fetch data from storage container.
 verifyPassword ($password1, $password2, $cryptType="md5")
 Crypt and verfiy the entered password.
 supportsChallengeResponse ()
 Returns true if the container supports Challenge Response password authentication.
 getCryptType ()
 Returns the crypt current crypt type of the container.
 getUser ($username)
 Returns a user assoc array.
 log ($message, $level=AUTH_LOG_DEBUG)
 Log a message to the Auth log.
- Public Member Functions inherited from ilAuthContainerBase
 loginObserver ($a_username, $a_auth)
 Called after successful login.
 failedLoginObserver ($a_username, $a_auth)
 Called after failed login.
 checkAuthObserver ($a_username, $a_auth)
 Called after check auth requests.
 logoutObserver ($a_username, $a_auth)
 Called after logout.

Data Fields

 $pwfile
- Data Fields inherited from Auth_Container
 $activeUser = ""
 User that is currently selected from the storage container.
 $_auth_obj = null
 The Auth object this container is attached to.

Detailed Description

Definition at line 63 of file SMBPasswd.php.

Member Function Documentation

Auth_Container_SMBPasswd::addUser (   $username,
  $password,
  $additional = '' 
)

Add a new user to the storage container.

Parameters
stringUsername
stringPassword
arrayAdditional information
Returns
boolean

Reimplemented from Auth_Container.

Definition at line 132 of file SMBPasswd.php.

References $additional, $pass, $res, $user, AUTH_LOG_DEBUG, and Auth_Container\log().

{
$this->log('Auth_Container_SMBPasswd::addUser() called.', AUTH_LOG_DEBUG);
$res = $this->pwfile->addUser($user, $additional['userid'], $pass);
if ($res === true) {
return $this->pwfile->save();
}
return $res;
}

+ Here is the call graph for this function:

Auth_Container_SMBPasswd::Auth_Container_SMBPasswd (   $filename)

Constructor of the container class.

Parameters
$filenamestring filename for a passwd type file
Returns
object Returns an error object if something went wrong

Definition at line 84 of file SMBPasswd.php.

References $filename, PEAR_ERROR_DIE, and PEAR\raiseError().

{
$this->pwfile = new File_SMBPasswd($filename,0);
if (!$this->pwfile->load()) {
PEAR::raiseError("Error while reading file contents.", 41, PEAR_ERROR_DIE);
return;
}
}

+ Here is the call graph for this function:

Auth_Container_SMBPasswd::changePassword (   $username,
  $password 
)

Change password for user in the storage container.

Parameters
stringUsername
stringThe new password

Reimplemented from Auth_Container.

Definition at line 169 of file SMBPasswd.php.

References $res, AUTH_LOG_DEBUG, and Auth_Container\log().

{
$this->log('Auth_Container_SMBPasswd::changePassword() called.', AUTH_LOG_DEBUG);
$res = $this->pwfile->modUser($username, '', $password);
if ($res === true) {
return $this->pwfile->save();
}
return $res;
}

+ Here is the call graph for this function:

Auth_Container_SMBPasswd::fetchData (   $username,
  $password 
)

Get user information from pwfile.

Parameters
stringUsername
stringPassword
Returns
boolean

Definition at line 105 of file SMBPasswd.php.

References AUTH_LOG_DEBUG, and Auth_Container\log().

{
$this->log('Auth_Container_SMBPasswd::fetchData() called.', AUTH_LOG_DEBUG);
return $this->pwfile->verifyAccount($username, $password);
}

+ Here is the call graph for this function:

Auth_Container_SMBPasswd::listUsers ( )

List all users that are available from the storage container.

Reimplemented from Auth_Container.

Definition at line 114 of file SMBPasswd.php.

References AUTH_LOG_DEBUG, and Auth_Container\log().

{
$this->log('Auth_Container_SMBPasswd::fetchData() called.', AUTH_LOG_DEBUG);
return $this->pwfile->getAccounts();
}

+ Here is the call graph for this function:

Auth_Container_SMBPasswd::removeUser (   $username)

Remove user from the storage container.

Parameters
stringUsername

Reimplemented from Auth_Container.

Definition at line 150 of file SMBPasswd.php.

References $res, AUTH_LOG_DEBUG, and Auth_Container\log().

{
$this->log('Auth_Container_SMBPasswd::removeUser() called.', AUTH_LOG_DEBUG);
$res = $this->pwfile->delUser($username);
if ($res === true) {
return $this->pwfile->save();
}
return $res;
}

+ Here is the call graph for this function:

Field Documentation

Auth_Container_SMBPasswd::$pwfile

Definition at line 72 of file SMBPasswd.php.


The documentation for this class was generated from the following file: