Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function drupalLogin(stdClass $user) {
- if (!module_exists('zagat_users')) {
- return parent::drupalLogin($user);
- }
- if ($this->loggedInUser) {
- $this->drupalLogout();
- }
- $edit = array(
- 'name' => $user->name,
- 'pass' => $user->pass_raw
- );
- $this->drupalPost('user', $edit, t('Sign In'));
- // If a "log out" link appears on the page, it is almost certainly because
- // the login was successful.
- $pass = $this->assertLink(t('Log out'), 0, t('User %name successfully logged in.', array('%name' => $user->name)), t('User login'));
- if ($pass) {
- $this->loggedInUser = $user;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement