{"id":18247035,"url":"https://github.com/thyseus/yii-user-management","last_synced_at":"2025-04-05T20:06:12.491Z","repository":{"id":3502030,"uuid":"4558956","full_name":"thyseus/yii-user-management","owner":"thyseus","description":"a user management module collection for the yii framework","archived":false,"fork":false,"pushed_at":"2016-09-15T10:51:46.000Z","size":1628,"stargazers_count":184,"open_issues_count":96,"forks_count":117,"subscribers_count":57,"default_branch":"master","last_synced_at":"2025-03-29T18:07:12.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thyseus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-05T11:27:51.000Z","updated_at":"2025-03-15T20:58:24.000Z","dependencies_parsed_at":"2022-08-20T04:50:46.290Z","dependency_job_id":null,"html_url":"https://github.com/thyseus/yii-user-management","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyseus%2Fyii-user-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyseus%2Fyii-user-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyseus%2Fyii-user-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thyseus%2Fyii-user-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thyseus","download_url":"https://codeload.github.com/thyseus/yii-user-management/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393568,"owners_count":20931812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T09:28:44.572Z","updated_at":"2025-04-05T20:06:12.460Z","avatar_url":"https://github.com/thyseus.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"yii-user-management\n===================\n\nA user management module collection for the yii framework \u003e= 1.1.14\n\nHint: For Yii2 i highly suggest the dektrium/yii2-user module: https://github.com/dektrium/yii2-user .\n\nFeatures:\n---------\n\n* Demo Project (https://github.com/thyseus/yii-user-management-demo)\n* Installer (will probably be replaced with migrations)\n* User Administration\n* Role Administration\n* Hybrid auth is bundled and can easily be integrated, see user/docs/hybridauth.txt.\n* All providers of hybrid auth and hybrid auth extra package are integrated:\nAOL, Google, Mail.ru, Plurk, Tumblr, Yahoo, Disqus, Identica, Murmur, px500,\nTwitchTV, Yandex, Facebook, Instagram, MySpace, QQ, Twitter, Foursquare,\nLastFM, Odnoklassniki, Sina, Viadeo, GitHub, LinkedIn, OpenID, Skyrock,\nVimeo, Goodreads, Live, Pixnet, Steam, Vkontakte\n* Permission System with a mixture of RBAC and ACL (see user/docs)\n* Profiles \u0026 Profile history \u0026 Profile Comments \u0026 Profile Fields Administration\n* Messaging System (send/receive Messages between Users) Submodule\n* User groups (user can add new groups, other users can join)\n* User Avatar upload\n* User Registration\n* Password Recovery\n* Friendship system\n* Mailing component (users can choose which messages he gets by email)\n* Base Language: English\n* Complete Translations to german, french\n* Almost complete Translation to spain thanks to bigchirv@gmail.com\n* Incomplete Translations to russian and polish\n\nUsage with demo application:\n-------------------------------\n\nStarting from 0.9, a demo application is available here:\n\nhttps://github.com/thyseus/yii-user-management-demo\n\nInstallation using composer:\n--------------------\n\n* Add yii user management to your project requirements:\n```\nphp composer.phar require thyseus/yii-user-management\n```\n* Add the vendor folder to the aliases in your yii configuration:\n\n```\narray(\n    'aliases' =\u003e array(\n      'vendor' =\u003e '/path/to/vendor',\n      ),\n    ),\n```\n\nManual Installation Instructions:\n-----------------------------------\n\n* The Yii User Management Module needs a mysql Database Connection to\nwork.\n\n* Clone the package into your projects modules/ directory:\n```\n$ cd protected/modules\n$ git clone https://github.com/thyseus/yii-user-management\n```\n\n* The Yii-user-management module contains submodules that you just extracted\ninto your application's modules/user directory. You can remove all submodules\nyou do not need. Move the files one folder up so they are inside your modules/\nfolder:\n\n```\n$ mv user/* .\n(optional: remove demo application)\n$ rm -rf index.php composer.json hybridauth.php controllers views\n```\n\n$ [youreditor] protected/config/main.php\n\nAdd these lines:\n\n```\n'modules' =\u003e array(\n    'user' =\u003e array(\n      'debug' =\u003e true,\n      )\n    ),\n```\n\nThe debug option is needed for the installation and is helpful during\ndevelopment. It should be set to false when running in production.\n\n* To let your Web Application use the Authentification Methods of\nthe User Management Module, we need to overwrite the default\nCWebUser Component with YumWebUser in your Application Configuration:\n\n```\n 'components'=\u003earray(\n   'user'=\u003earray(\n        'class' =\u003e 'application.modules.user.components.YumWebUser',\n        'allowAutoLogin'=\u003etrue,\n        'loginUrl' =\u003e array('//user/user/login'),\n        [...]\n      ),\n\n 'import'=\u003earray(\n  'application.modules.user.models.*',\n\t[...]\n```\n\nThis tells our Web Application that is can access the Model 'User'\neven when not in the modules/user environment. This is needed for calling\nUser::hasRole($role) in your Code to check if the logged in User belongs to the\nrole. This is explained in the detailed Documentation. It is good to let this\nline occur as the first included Model, so you can extend the User-Model with\nyour own in your Application models/ Directory if you like.\n\n* Make sure to set a caching component in your application components\nsection. Yum relies on it. If you do not want to use a cache, add\n\n```\n\t'components' =\u003e array(\n\t\t\t'cache' =\u003e array('class' =\u003e 'system.caching.CDummyCache'),\n```\n\ninside the components section of your config/main.php.\n\nAlso see http://www.yiiframework.com/doc/guide/1.1/en/caching.overview about\nsome general information about caching in yii.\n\n* Run the User Management Installer in your Web-Browser:\n\nhttp://localhost/testdrive/index.php/user/install\nor\nhttp://localhost/testdrive/index.php?r=user/install\n\ndepending on your URL route setup.\n\n* Now the Installer of the User Management Module should appear.\nTo the right you can set up alternate Table Names used by the\nModule. In most cases this is not needed and you can keep this\nSettings. If you do change this, be sure to set up the correct table\nNames in your Application Configuration, so the User Module can access\nthem.\n\nClick 'Install Module'. After clicking it, the install script will\ncreate the database tables needed by the module(s). Then it will show\nyou the neccesary modifications to be made. Add the Modules you need to your\nApplication Configuration as provided by the install script in config/main.php.\nYou can also remove the Yum modules you don't want to use.\n\n* Congratulations, you have installed the User Management Module! Lets\ntidy up a little bit:\n\n* Login as admin/admin and navigate to index.php?r=user/user/admin.\nThis is your user management administration panel. Click on \"Administrate your Users\"\nNow you are taken to the default Front-End Login-Screen of the User\nManagement Module. Log in with the Username admin and Password admin.\n\n* Click on the 'update Icon' (the pencil) of your administrator User.\nChange the Password to something more safe than 'admin'. Click Save.\n\n* If you didn't already, remove the 'debug' =\u003e 'true' line from your\nApplication Configuration, so your new data can't get overwritten accidentally\nby the installation process.\n\nConfiguration of your freshly installed User Management Module:\n---------------------------------------------------------------\n\nLanguage:\n---------\nThe Yii-User Management Module uses the language that is set in\nthe Application Configuration. For example, you can add a\n\n'language' =\u003e 'de',\n\nin your config/main.php to get German Language strings. At the moment\nEnglish, German, French and Polish are supported.\n\nQuick Login Widget:\n-------------------\nIf you want to display a quick login widget somewhere in your Web Application,\njust call in your view file:\n\n\u003c?php $this-\u003ewidget('application.modules.user.components.LoginWidget'); ?\u003e\n\nPassword Requirements:\n----------------------\nYou can setup the password Requirements within the 'passwordRequirements'\noption of the Module, for example:\n\n 'user' =\u003e array(\n        'passwordRequirements' =\u003e array(\n          'minLen' =\u003e 4,\n          'maxLen' =\u003e 16,\n          'maxRepetition' =\u003e 2,\n          'minDigits' =\u003e 3,\n          ),\n\nPlease see components/CPasswordValidator.php for possible password\nrequirement options\n\nUser Registration:\n------------------\nSet the Variable 'enableActivationConfirmation' to false in the module configuration to\nlet users register for your application without needing to receive/click an emailed confirmation link.\n\nRole Management:\n----------------\nYou can add up new roles in the Role Manager. To check for access\nto this roles, you can use this code Snippet everywhere in your\nYii Application. Most likely it will be used in the ACL Filter of\nyour Controllers:\n\n\n```\nif(Yii::app()-\u003euser-\u003ecan('action'))\n{\n // user is allowed\n}\nelse\n{\n // user is not allowed to do this\n}\n```\n\nPlease see the file user/docs/logging.txt for information on how to set up\nthe logging functions of the Yii User Management module.\n\nWhere to go from now on?\n------------------------\nThere are some examples on how to extend from the Yii User Management\nModule and how to implement project-specific stuff. See the files in\nthe user/docs/ directory for all this.\n\nSee user/docs/hybridauth.txt for instruction on how to use the wonderful\nhybrid auth framework that is bundled with yii-user-management.\n\n\nFAQ:\n----\nQ: I get an exception when running the Installer\n\nA: Please make sure to log out from any session. Clear your cookies to make\nsure you are not logged in in your Web Application anymore.\n\nQ: I get the error Message: CWebUser does not have a method named \"isAdmin\":\n\nA: Please make sure that you have the following in your application configuration:\n\n```\n\t'components'=\u003earray(\n\t\t'user'=\u003earray(\n\t\t\t'class' =\u003e 'application.modules.user.components.YumWebUser',\n```\n\n\nQ: I get the error Message: the table \"{{users}}\" for active record class \"YumUser\" cannot be found in the database.\n\nA: Please make sure that you have the following in your application configuration:\n\n```\n\t\t'db'=\u003earray(\n\t\t\t'tablePrefix' =\u003e '',\n\t\t\t[...]\n```\n\nQ: Why doesn´ t the yii-user-management have submodules?\n\nA: Submodules are supported by yii, but having a path like\napplication.modules.user.modules.role.controllers.YumRoleController\nreally looks strange, so we decided it is better to keep all modules inside\nthe root modules/ directory.\n\nQ: I get the following error while installing:\nGeneral error: 2014 Cannot execute queries while other unbuffered queries are active\n\nA: thanks to NetDabbler, there is a workaround:\n\nComment the folowing lines in YumInstallController.php\n// $sql = file_get_contents(Yii::getPathOfAlias('application.modules.user.docs') . '/yum_translation.sql');\n// $db-\u003ecreateCommand($sql)-\u003eexecute();\n\nInsert the translation data manually in a cmd window as:\nmysql -u yourusername -p testyum \u003c docs/yum_translation.sql\n\n\nQ: I still got errors !\n\nA: Make sure to enable a caching component, at least CDummyCache, in your config/main.php:\n\n'cache'=\u003earray( 'class'=\u003e'system.caching.CDummyCache',\t),\n\nQ: I still got errors !\n\nA: Try to add this in your config/main.php:\n\n```\n'session' =\u003e array(\n\t\t'sessionName' =\u003e 'SiteSession',\n\t\t'class' =\u003e 'CHttpSession',\n\t\t'autoStart' =\u003e true,\n\t\t),\n```\n\nThe documentation is stored in the user/docs directory.\nPlease read user/docs/install.txt for a installation instruction.\n\nPlease DO read the documentation since it is not 100% trivial to install\nthis module. There also is a FAQ of common mistakes at the end.\n\nReport all issues to the github issue tracker, thank you!\n\nEnjoy this module.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthyseus%2Fyii-user-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthyseus%2Fyii-user-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthyseus%2Fyii-user-management/lists"}