Assembla home | Assembla project page
 

Changeset 121

Show
Ignore:
Timestamp:
07/19/07 14:26:19 (1 year ago)
Author:
digitalspaghetti
Message:

Added arrays for required and options returns in openid. Added style to box.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/controllers/users_controller.php

    r120 r121  
    141141                        } else if ($this->data['User']['openid']) { 
    142142                                $this->Session->del('element_data.Nav'); 
    143                                 $this->Openid->authenticate($this->data['User']['openid'], 'http://'.$_SERVER['SERVER_NAME'].'/users/login', 'http://'.$_SERVER['SERVER_NAME']); 
     143                                $this->Openid->authenticate($this->data['User']['openid'], 'http://'.$_SERVER['SERVER_NAME'].'/users/login', 'http://'.$_SERVER['SERVER_NAME'], array( array('sreg','required','nickname,email,country'), array('sreg','optional','dob'))); 
    144144                        } 
    145145                } else { 
     
    150150                if ($response->status == Auth_OpenID_SUCCESS) { 
    151151                        $this->log($response); 
    152                         if ($this->User->findByOpenid($response->signed_args['openid.identity']) ) { 
    153                                                 $this->Session->setFlash('User Authenticated Success'); 
    154                                                 //$this->Session->write('username', $response->signed_args['openid.sreg.nickname']); 
     152                        if ($this->User->findByOpenid($response->identity_url) ) { 
     153                                                $this->Session->setFlash('User Authenticated Success ' . $response->signed_args['openid.sreg.nickname']); 
     154                                                $this->Session->write('username', $response->signed_args['openid.sreg.nickname']); 
    155155                                                $this->redirect('/'); 
    156156                                        } else { 
  • branch/views/users/login.ctp

    r119 r121  
    66         
    77        <div id="tab1"> 
    8                 <h2>Normal Login</h2> 
    98                <?php e($form->create('User', array('action'=>'login')));?> 
    109         
     
    2221        </div> 
    2322        <div id="tab2"> 
    24                 <h2>OpenID Login</h2> 
    2523                <?php e($form->create('User', array('action'=>'login')));?> 
    2624                <fieldset id="login2"> 
  • branch/webroot/css/default.css

    r119 r121  
    231231    color: #000; 
    232232} 
     233 
     234/* Open ID*/ 
     235input#UserOpenid { 
     236   background: url(http://openid.net/login-bg.gif) no-repeat; 
     237   background-color: #fff; 
     238   background-position: 0 50%; 
     239   color: #000; 
     240   padding-left: 18px; 
     241}