Subversion Repositories oidplus

Rev

Rev 1143 | Rev 1201 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1143 Rev 1199
Line 42... Line 42...
42
 
42
 
43
                        OIDplus::getActiveCaptchaPlugin()->captchaVerify($params, 'captcha');
43
                        OIDplus::getActiveCaptchaPlugin()->captchaVerify($params, 'captcha');
44
 
44
 
45
                        $this->inviteSecurityCheck($email);
45
                        $this->inviteSecurityCheck($email);
46
                        // TODO: should we also log who has invited?
46
                        // TODO: should we also log who has invited?
47
                        OIDplus::logger()->log("[INFO]RA($email)!", "RA '$email' has been invited");
47
                        OIDplus::logger()->log("[INFO]RA(%1)!", "RA '%1' has been invited", $email);
48
 
48
 
49
                        $timestamp = time();
49
                        $timestamp = time();
50
                        $activate_url = OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL) . '?goto='.urlencode('oidplus:activate_ra$'.$email.'$'.$timestamp.'$'.OIDplus::authUtils()->makeAuthKey('activate_ra;'.$email.';'.$timestamp));
50
                        $activate_url = OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL) . '?goto='.urlencode('oidplus:activate_ra$'.$email.'$'.$timestamp.'$'.OIDplus::authUtils()->makeAuthKey('activate_ra;'.$email.';'.$timestamp));
51
 
51
 
52
                        $message = $this->getInvitationText($email);
52
                        $message = $this->getInvitationText($email);
Line 85... Line 85...
85
                        if (strlen($password1) < OIDplus::config()->getValue('ra_min_password_length')) {
85
                        if (strlen($password1) < OIDplus::config()->getValue('ra_min_password_length')) {
86
                                $minlen = OIDplus::config()->getValue('ra_min_password_length');
86
                                $minlen = OIDplus::config()->getValue('ra_min_password_length');
87
                                throw new OIDplusException(_L('Password is too short. Need at least %1 characters',$minlen));
87
                                throw new OIDplusException(_L('Password is too short. Need at least %1 characters',$minlen));
88
                        }
88
                        }
89
 
89
 
90
                        OIDplus::logger()->log("[OK]RA($email)!", "RA '$email' has been registered due to invitation");
90
                        OIDplus::logger()->log("[OK]RA(%1)!", "RA '%1' has been registered due to invitation", $email);
91
 
91
 
92
                        $ra = new OIDplusRA($email);
92
                        $ra = new OIDplusRA($email);
93
                        $ra->register_ra($password1);
93
                        $ra->register_ra($password1);
94
 
94
 
95
                        return array("status" => 0);
95
                        return array("status" => 0);