blogapi_validate_user($username, $password)
drupal/modules/blogapi/blogapi.module, line 684
Ensure that the given user has permission to edit a blog.
function blogapi_validate_user($username, $password) {
global $user;
$user = user_authenticate(array('name' => $username, 'pass' => $password));
if ($user->uid) {
if (user_access('administer content with blog api', $user)) {
return $user;
}
else {
return t('You do not have permission to edit this blog.');
}
}
else {
return t('Wrong username or password.');
}
}