Line 109 | Line 109 |
---|
*/ function _fill_acl($user_permissions) {
|
*/ function _fill_acl($user_permissions) {
|
| $seq_cache = array();
|
$this->acl = array(); $user_permissions = explode("\n", $user_permissions);
| $this->acl = array(); $user_permissions = explode("\n", $user_permissions);
|
Line 125 | Line 126 |
---|
while ($subseq = substr($seq, $i, 6)) {
|
while ($subseq = substr($seq, $i, 6)) {
|
| if (isset($seq_cache[$subseq])) { $converted = $seq_cache[$subseq]; } else { $converted = $seq_cache[$subseq] = str_pad(base_convert($subseq, 36, 2), 31, 0, STR_PAD_LEFT); }
|
// We put the original bitstring into the acl array
|
// We put the original bitstring into the acl array
|
$this->acl[$f] .= str_pad(base_convert($subseq, 36, 2), 31, 0, STR_PAD_LEFT);
| $this->acl[$f] .= $converted;
|
$i += 6; } }
| $i += 6; } }
|
Line 339 | Line 349 |
---|
/** * Get permission listing based on user_id/options/forum_ids
|
/** * Get permission listing based on user_id/options/forum_ids
|
| * * Be careful when using this function with permissions a_, m_, u_ and f_ ! * It may not work correctly. When a user group grants an a_* permission, * e.g. a_foo, but the user's a_foo permission is set to "Never", then * the user does not in fact have the a_ permission. * But the user will still be listed as having the a_ permission. * * For more information see: http://tracker.phpbb.com/browse/PHPBB3-10252
|
*/ function acl_get_list($user_id = false, $opts = false, $forum_id = false) {
| */ function acl_get_list($user_id = false, $opts = false, $forum_id = false) {
|
Line 898 | Line 916 |
---|
$method = 'login_' . $method; if (function_exists($method)) {
|
$method = 'login_' . $method; if (function_exists($method)) {
|
$login = $method($username, $password);
| $login = $method($username, $password, $user->ip, $user->browser, $user->forwarded_for);
|
// If the auth module wants us to create an empty profile do so and then treat the status as LOGIN_SUCCESS if ($login['status'] == LOGIN_SUCCESS_CREATE_PROFILE)
| // If the auth module wants us to create an empty profile do so and then treat the status as LOGIN_SUCCESS if ($login['status'] == LOGIN_SUCCESS_CREATE_PROFILE)
|