Are you sure you’re using the SVN version of the project? Did you follow the installation steps from the Installation Instructions page on the Wiki?
http://code.google.com/p/yii-user-management/wiki/InstallationInstructions
Are you sure you’re using the SVN version of the project? Did you follow the installation steps from the Installation Instructions page on the Wiki?
http://code.google.com/p/yii-user-management/wiki/InstallationInstructions
Me, too…
UserHasRole has been renamed to userRole
sorry for all this inconvinience. Its not "API stable", since its still in development…
The Wiki documentation is updated to the changes made to the SVN repository, AFAIK. So it is RECOMMENDED that everybody use the InstallationInstructions Wiki page if they gonna make any new installation.
Before we do a 0.8 final release we will update the documentation in the docs/ directory.
Could you not use Tom’s blowfishsalt as default…?
Very easy to implement for you I think… I tried but I must be missing something.
https://github.com/tom--/Randomness <— explains why and how
i tried to do it like following:
echo crypt(‘admin’,Randomness::blowfishSalt());
to get a string I can save in the database
then modified encrypt() like this:
public static function encrypt($string =""){
return crypt($string, Randomness::blowfishSalt());
}
in YumUser.php,
oh btw, saw someone here discussing routes
I have path style url’s, and my route is ‘reg/*’=>’//registration/registration/registration’,
meaning I reach registrationform at domain/reg… no problems:) win7
Hello Everybody,
I am Steve,
I’d like to ask about why my yum::module(xxxxx) doesn’t load the class
for example :
/Applications/MAMP/htdocs/testd/protected/modules/profile/controllers/YumProfileController.php(80)
$this->layout=Yum::module(‘profile’)->layout;
public function beforeAction($action) {
75 $test=Yum::module(‘profile’);
76 if (!empty($test)){
77 $this->layout = $test->layout;
78 }
79 else
80 $this->layout = $test->layout; // error Here
81 return parent::beforeAction($action);
82 }
The error shout : Trying to get property of non-object
In my opinion, the object was null and the code wasn’t called successfully, cause when I entered string ‘yumprofile’ as the content for the public variable $layout within class ProfileModule, it doesn’t give me any error on the line 80
This error is pretty much the same when I wanted to access the variable public inside the class RoleModule, which is $userHasRoleTable //the content is {{user_has_role}}, for know I’ve change that manually
Is there any solution(s) for this? or have one of you encounterd the same problem as mine?
Thank you
Regards,
Steve
I’ve looked through this thread a bit(and googled extensively) and haven’t found anyone else having this problem.
I’ve followed the directions here: http://www.yiiframework.com/wiki/195/implementing-a-registration-process-using-the-yii-user-management-module/
But, my RegistrationController is not overriding the YumRegistrationController. I am new to Yii, so maybe I’m just missing something obvious. I’ve gone over that page a few times and have done everything exactly as directed. No matter what on my site (example.com/app/index.php/registration/registration/registration/) still loads the YumRegistrationController, not my own.
Any idea where things may be going wrong? (Other than between the keyboard and the chair…)
Update: YUM v0.8rc5, yii v1.1.10.r3566
Hi Jonathan,
maybe you have a a name conflict. Calling index.php?r=registration/… produces a conflict because the
module and the controller is called "registration", and yii does not know where to route to. Either
use a customized route or call your RegistrationController something different.
If that’s not the problem please post some code so i can take a deeper look, thanks.
Thyseus, thank you very much for the reply! Again, I’m definitely on a learning curve here so I appreciate the help greatly. It would seem that is exactly what was happening. I was under the impression that my controller would override the route automatically (by superseding it). Renaming it something like “myregistration” is working as expected.
Would this be the best way to achieve what I’m trying to do? Or would it be better to do a custom route (or something else altogether)?
Right now the YUM normal user registration is still available, and is linked to from the login page form. Should I just edit those view files in place to have it point to my controller, do I have to implement my own dumby login controller, or is there a way to (easily) override those view files?
Hi thyseus,
Please kindly answer this problem,
The problem is the process can not get the variable from the class, I’ve set the variable as a static, but nothing happen
Forgive me if I make a dummy question,
PHP notice
Trying to get property of non-object
/Applications/MAMP/htdocs/testd/protected/modules/user/models/YumUser.php(354)
Yii::import('application.modules.profile.models.*');
return array(
'permissions' => array(self::HAS_MANY, 'YumPermission', 'principal_id'),
'managed_by' => array(self::HAS_MANY, 'YumPermission', 'subordinate_id'),
'messages' => array(self::HAS_MANY, 'YumMessage', 'to_user_id', 'order' => 'messages.id DESC'),
'sent_messages' => array(self::HAS_MANY, 'YumMessage', 'from_user_id'),
'visits' => array(self::HAS_MANY, 'YumProfileVisit', 'visited_id'),
'visited' => array(self::HAS_MANY, 'YumProfileVisit', 'visitor_id'),
'profile' => array(self::HAS_ONE, 'YumProfile', 'user_id'),
'friendships' => array(self::HAS_MANY, 'YumFriendship', 'inviter_id'),
'friendships2' => array(self::HAS_MANY, 'YumFriendship', 'friend_id'),
'friendship_requests' => array(self::HAS_MANY, 'YumFriendship', 'friend_id', 'condition' => 'status = 1'), // 1 = FRIENDSHIP_REQUEST
354 'roles' => array(self::MANY_MANY, 'YumRole', Yum::module('role')->userHasRoleTable . '(user_id, role_id)'),
'memberships' => array(self::HAS_MANY, 'YumMembership', 'user_id'),
'privacy' => array(self::HAS_ONE, 'YumPrivacySetting', 'user_id'),
);
}
public function isFriendOf($invited_id)
{
foreach ($this->getFriendships() as $friendship) {
if ($friendship->inviter_id == $this->id && $friendship->friend_id == $invited_id)
return $friendship->status;
}
I’m using User module in my new project.
Help me with returnUrl.
As example: catalog/view is closed, so when user goes to login, he will be redirected to user/profile page.
What i should do for redirection on catalog/view?
Hi,
I’m a new yii user and I’m trying to use this extension.
After reading your instruction, I’ve finished install yum without any error during installation. Otherwise, when I begin to login to manage (default admin account), click login will direct me to 500 internal server error.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
That’s error exposing when I use Chrome, testing with firefox or opera, after login it shows blank page instead.
For further information, I can log-in yii default app, however, yum’s version which I’m using is 0.8rc7.
Any help would be appreciated.
It seems like the file
protected/modules/user/UserModule.php
does not exist. Please re-check if the files are properly extracted in
the correct directory.
thyseus, that was totally my mistake.
I thought all of the svn was to be unpacked into a core YUM folder
i.e. module/YUM/user
module/YUM/avatar
etc…
Thank you for the super quick reply!
Just reinstalled today (4/4) with the most recent svn download and still receiving a 404 error that unable to resolve the request "avatar/avatar/editAvatar".
Checked the module, controller, and AvatarModule.php and all seems to be in order.
Edit:
Figured it out! If you look at user/docs/avatar.txt you’ll see that you have to (at the very least) add:
'modules'=>array(
......
'avatar',
....
),
to your config/main.php file. Once you do this, you’ll be good to go!
Anyone help me on this? I’ve checked the UserModule.php under /modules/user/, it’s still there. While installation was good, and I’m able to login yii default app, login YUM manage just doesnt work.
Use the latest SVN version instead of the provided .zip file in Yii’s extensions library.
http://code.google.com/p/yii-user-management/wiki/InstallationInstructions
@thyseus, I think we should release a new .zip file and put it in the Yii extension page. The SVN right now is far more stable than the latest published .zip and AFAIK many new users are having problems with YUM because they’re downloading the old .zip.
What do you think fella?
I’m not saying to “freeze” it to do a release, it should be more like a snapshot. Also, we could adopt a new version numbering for YUM. Instead of using 0.8.x we can just use the SVN revision as the release number. When the stuff gets fairly stable (like now, for example) we can zip the repo and put it in the extension page.
My two cents!
I’m currently using the svn trunk instead of yii extension library one. I already check the url settings, turn on/off url manager seems the same thing happen. I think I should investigate on user/auth.
chirvo: I will prepackage a -rc6 right now. Its available in 5 minutes. Please (everyone interested)
check if this zipfile is OK.
Once confirmed, we will do the final 0.8 release. Thats what a RC is for, anyway.
I think we should keep the version numbering schema. Revisions in SVN and releases x.x .