Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
690a4696
Commit
690a4696
authored
Sep 17, 2008
by
Nigel McNie
Browse files
Remove auth method get_user_info_cached, which doesn't appear to be called anywhere.
parent
a8c9fa3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/lib.php
View file @
690a4696
...
...
@@ -243,36 +243,6 @@ abstract class Auth {
return
false
;
}
/**
* Given a username, return information about the user from the database.
* This object must_be_ready, which means it will have an authinstanceid.
* This is used to disambiguate between users with the same username.
*
* The information retrieved must be all rows in the user table, with the
* timestamps formatted as unix timestamps. An example (taken from the
* internal authentication mechanism, which allows usernames to be case
* insensitive):
*
* <code>
* get_record('usr', 'LOWER(username)', strtolower($username), null, null, null, null,
* '*, ' . db_format_tsfield('expiry') . ', ' . db_format_tsfield('lastlogin'));
* </code>
*
* @param string $username The username to get information for
* @return array Data that can be used to populate the session
* @throws AuthUnknownUserException If the user is unknown to the
* authentication method
*/
public
function
get_user_info_cached
(
$username
)
{
$this
->
must_be_ready
();
if
(
!
$result
=
get_record
(
'usr'
,
'LOWER(username)'
,
strtolower
(
$username
),
null
,
null
,
null
,
null
,
'*, '
.
db_format_tsfield
(
'expiry'
)
.
', '
.
db_format_tsfield
(
'lastlogin'
)))
{
throw
new
AuthUnknownUserException
(
"
\"
$username
\"
is not known to AuthInternal"
);
}
$cache
[
$result
->
username
]
=
$result
;
return
$result
;
}
/**
* Given a password, returns whether it is in a valid format for this
* authentication method.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment